package com.zsp.coupon.dao;


import com.zsp.coupon.constant.CouponStatus;
import com.zsp.coupon.entity.Coupon;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/***
 * coupon到接口定义
 */
public interface CouponDao extends JpaRepository<Coupon,Integer> {
    /***
     * 根据userid+状态寻找优惠卷的记录
     * @param userId
     * @param status
     * @return
     */
    List<Coupon> findAllByUserIdAndStatus(Long userId, CouponStatus status);

}
